#set(title = "文章列表")
#@layoutToo()
#define main()

<form action="/blog/admin/batchDelete" method="post">
<table class="table tpl-table table-td-break domain-list">
    <button type="button" ><a  href="/blog/admin/addBlog">添加文章</a></button>
    <tr>
        <th><input name="List" type="checkbox" value="" onclick="swapCheck()"/></th>
        <th></th>
        <th>文章标题</th>
        <th style="width: 8%">摘要</th>
        <th>点击</th>
        <th>创建时间</th>
        <th>关键字</th>
        <th>原创OR转载</th>
        <th>基本操作</th>
    </tr>
    </thead>
    <h3>数量：#(blog.totalRow)</h3>
    #if(blog.totalRow > 0)
    <tbody>
    #for(blog : blog.list)
    <tr>
        <th><input name="List" type="checkbox" value="#(blog.logId)"/></th>
        <th width="" class="" type="checkbox">#(for.count)</th>
        <th width="" class="" type="checkbox">#(blog.title)</th>
        <th style="width:8%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="#(blog.digest)"
            class="" type="checkbox">#(blog.digest)
        </th>
        <th width="" class="" type="checkbox">#(blog.click)</th>
        <th width="" class="" type="checkbox">#date(blog.createTime)</th>
        <th width="" class="" type="checkbox">#(blog.keywords)</th>
        <th width="" class="" type="checkbox">#(blog.alias)</th>
        <th width="6%" class="" type="checkbox"><a href="/blog/admin/editBlog?logId=#(blog.logId)">修改</a>
            <a href="/blog/admin/deleteContent?logId=#(blog.logId)">删除</a>
        <th>
    </tr>
    #end
    <tr><th colspan="10">
        <input type="submit" value="删除" class="btn " id="submit1"/>
    </th></tr>
    </tbody>
    #else
    <p class="center">没有数据...</p>
    #end
</table>
</form>

<script>
    //checkbox 全选/取消全选
    var isCheckAll = false;
    function swapCheck() {
        if (isCheckAll) {
            $("input[type='checkbox']").each(function () {
                this.checked = false;
            });
            isCheckAll = false;
        } else {
            $("input[type='checkbox']").each(function () {
                this.checked = true;
            });
            isCheckAll = true;
        }
    }
</script>
#include("/WEB-INF/view/common/blog_paginate.html")
#@paginate(blog.pageNumber, blog.totalPage, actionUrl, urlParams)
#end